home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 27.zip / BS1 part 27 / Panorama3_d1.adf / ARexxMacros / PanToDCTV.rexx < prev    next >
OS/2 REXX Batch file  |  1993-02-20  |  2KB  |  68 lines

  1. /* Send a picture from Panorama to ADPro to create and display           */
  2. /*   a picture in DCTV format                                            */
  3. /* by James M. Bardeen.                                                  */
  4. /* AdPro must be loaded and running in the background.                   */
  5. /* and a 24-bit picture must have been created and                       */
  6. /* must be still "held" in memory by Panorama.                           */
  7. /* You must have enough memory to run Panorama and ADPro simultaneously  */
  8. /* and store 2 copies of the 24-bit picture in RAM.                      */
  9.  
  10.  
  11. /* Do limited testing to see if ADPro is running */
  12. say
  13. if show(port, 'ADPro') = 0 then do
  14.   say "Can't find ADPro."
  15.   EXIT
  16. end
  17.  
  18. ADDRESS 'Panorama'
  19. say "Saving 24-bit pic to ram:pan.iff"
  20. fname = "ram:pan.iff"
  21. /* If you are short of RAM, change this to store pan.iff in a   */
  22. /*   directory on your hard drive.   */
  23. 'SaveIFF24 'fname
  24. err = RC
  25. if RC ~= 0 then do
  26.   say "Save failed."
  27.   EXIT
  28. end
  29. /*  Eliminate the following 2 commands if you have lots of memory  */
  30. 'KillPic'  /* Frees picture memory in Panorama  */
  31. 'HoldPic' /* Reenables hold pic in Panorama  */
  32.  
  33. say "Make ADPro do its stuff."
  34. 'SetBusyPointer'
  35.  
  36. ADDRESS 'ADPro'
  37. OPTIONS RESULTS
  38. 'PSTATUS UNLOCKED'
  39. 'LFORMAT UNIVERSAL'
  40. err = RC
  41. if err ~= 0 then do
  42.   'ADPRO_TO_FRONT'
  43.   OKAY1 "Unable to find UNIVERSAL loader"
  44. end
  45. if err=0 then do
  46.   'LOAD 'fname
  47.   err = RC
  48.   if err ~= 0 then do
  49.     'ADPRO_TO_FRONT'
  50.     OKAY1 "Unable to load IFF file "fname
  51.   end
  52. end
  53. if err=0 then do
  54.   'ADPRO_TO_FRONT'
  55.   'OPERATOR DCTV'
  56.   if RC = 0 then ADPRO_DISPLAY
  57.   else OKAY1 "DCTV operator not available."
  58. end
  59. /* If you have a separate monitor for the Firecracker display  */
  60. /*    you may want to add an 'ADPRO_TO_BACK' command here   */
  61.  
  62. ADDRESS COMMAND
  63.   'delete < nil: > nil: 'fname
  64.  
  65. ADDRESS 'Panorama'
  66. say "Done."
  67. 'ClearPointer'
  68.